package com.woniuxy.userapp.client;


import com.woniuxy.commons.util.Result;
import com.woniuxy.userapp.client.param.AddStudentInfo;
import com.woniuxy.userapp.client.param.StudentInfo;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;


@FeignClient(contextId = "StudentClient",name="yoga-user", path="/user")
@Component
public interface StudentClient {

    @ApiOperation("根据学员id查找该学员账户id")
    @RequestMapping(value = "/student/findAccountIdByStudentId",method = RequestMethod.GET)
    public Result<Integer> findAccountIdByStudentId(@RequestParam Integer stuentId);

    @ApiOperation("根据前台账户id查询该学员信息")
    @RequestMapping(value = "/student/findStudentByAccountId")
    public Result<StudentInfo> findStudentByAccountId(@RequestParam Integer accountId);


    @ApiOperation("完善学生信息")
    @RequestMapping(value = "/student/addStudent",method = RequestMethod.POST)
    public Result addStudent(@RequestBody AddStudentInfo addStudentInfo);
}
